package me.zhengjie.modules.finace_taxation.service;

import me.zhengjie.base.PageInfo;
import me.zhengjie.modules.finace_taxation.domain.FtSearchVo;
import me.zhengjie.modules.finace_taxation.domain.FtServiceType;
import me.zhengjie.modules.finace_taxation.service.dto.FtServiceTypeDto;
import me.zhengjie.modules.finace_taxation.service.dto.FtServiceTypeQueryParam;
import org.springframework.data.domain.Pageable;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
* @author 杨荣森
* @date 2021-07-01
*/
public interface FtServiceTypeService {

    static final String CACHE_KEY = "ftServiceType";

    /**
    * 查询数据分页
    * @param query 条件
    * @param pageable 分页参数
    * @return PageInfo<FtServiceTypeDto>
    */
    PageInfo<FtServiceTypeDto> queryAll(FtServiceTypeQueryParam query, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param query 条件参数
    * @return List<FtServiceTypeDto>
    */
    List<FtServiceTypeDto> queryAll(FtServiceTypeQueryParam query);

    FtServiceType getById(String id);
    FtServiceTypeDto findById(String id);

    /**
     * 插入一条新数据。
     */
    int insert(FtServiceTypeDto resources);
    int updateById(FtServiceTypeDto resources);
    int removeById(String id);
    int removeByIds(Set<String> ids);

    // 根据关键字搜索
    List<FtSearchVo> searchByKeyWords(Map<String, Object> map);


    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
     void download(List<FtServiceTypeDto> all, HttpServletResponse response) throws IOException;
}
